From: Ian Jackson Date: Tue, 10 Feb 2015 20:09:49 +0000 (+0000) Subject: libxl: Comment cleanups X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3510 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=5e9bb4c6db29935796abc161d85b4fb9ea25d812;p=xen.git libxl: Comment cleanups * Add two comments in libxl_remus_disk_drbd documenting buggy handling of the hotplug script exit status. * Add a section heading for async exec in libxl_aoutils.c * Mention the right function name (libxl__ev_child_fork, not libxl__ev_fork) in libxl_internal.h Signed-off-by: Ian Jackson CC: Yang Hongyang CC: Wen Congyang CC: Lai Jiangshan Acked-by: Yang Hongyang Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c index 3b77286904..da102a04e9 100644 --- a/tools/libxl/libxl_aoutils.c +++ b/tools/libxl/libxl_aoutils.c @@ -478,6 +478,8 @@ int libxl__openptys(libxl__openpty_state *op, return rc; } +/*----- async exec -----*/ + static void async_exec_timeout(libxl__egc *egc, libxl__ev_time *ev, const struct timeval *requested_abs) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 8da2b7f1ed..7f81dd338c 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1413,7 +1413,7 @@ _hidden int libxl__spawn_record_pid(libxl__gc*, libxl__spawn_state*, * This is a NOT function for waiting for ordinary child processes. * If you want to run (fork/exec/wait) subprocesses from libxl: * - Make your libxl entrypoint use the ao machinery - * - Use libxl__ev_fork, and use the callback programming style + * - Use libxl__ev_child_fork, and use the callback programming style * * This function is intended for interprocess communication with a * service process. If the service process does not respond quickly, diff --git a/tools/libxl/libxl_remus_disk_drbd.c b/tools/libxl/libxl_remus_disk_drbd.c index 3215f931dc..afe9b61d56 100644 --- a/tools/libxl/libxl_remus_disk_drbd.c +++ b/tools/libxl/libxl_remus_disk_drbd.c @@ -145,6 +145,8 @@ static void match_async_exec_cb(libxl__egc *egc, if (status) { rc = ERROR_REMUS_DEVOPS_DOES_NOT_MATCH; + /* BUG: seems to assume that any exit status means `no match' */ + /* BUG: exit status will have been logged as an error */ goto out; }